<!doctype>
<html>
<head>
    <meta charset="UTF-8">
    <title>KaiX</title>
    {% load staticfiles %}
    <link rel="stylesheet" href="{% static "css/bootstrap.min.css" %}">
    <link rel="stylesheet" href="{% static "css/index.css" %}">
    <script src="{% static "js/jquery-3.3.1.min.js" %}"></script>
    <script src="{% static "js/bootstrap.min.js" %}"></script>
</head>
<body>
<header>
<nav class="navbar nav-tabs navbar-fixed-top">
<div class="container">
  <div class="container-fluid">
    <div class="navbar-header col-sm-4">
      <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
        <span class="glyphicon glyphicon-menu-hamburger"></span>
        <span class="icon-bar"></span> <span class="icon-bar"></span>
      </button>
      <a class="navbar-brand" href="{% url 'blog:index' %}">KaiX</a>
    </div>
    <div class="collapse navbar-collapse col-lg-8" id="myNavbar">
      <ul class="nav navbar-nav">
        <li><a href="{% url 'blog:index' %}">主页</a></li>
        <li><a href="{% url 'blog:analysis' %}">分析</a></li></ul>

    </div>
  </div>
</div>
</nav>
</header>
<div class="container" style="margin-top: 60px">
    <div class="col-sm-12 blog_page">
    <div  class="text-center">
        <h2>{{ blog.blog_title }}</h2>
    </div>
    <div class="col-lg-12">
        <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            作者：<a href="{{ user.user_url }}">{{ user.user_name }}</a>
            来源：<a href="http://www.duwenzhang.com">读文章网</a>
            时间：{{ blog.blog_date_time }}
            浏览量：{{ blog.blog_view }}
            评论数：{{ blog.blog_comment }}
        </p>
        <hr>
    </div>
    <div>
        <p>{{ blog.blog_content }}
        <script type="text/javascript">
            var str="{{ blog.blog_content }}";
            var strs = str.split("\\n");
            for (var i=0;i<strs.length ;i++ )
            {
                document.write("<p>" + strs[i] + "</p>");
            }
            //document.write(str)
        </script>
        </p>
    </div>
    </div>
  </div></div>
<footer>
    <div class="text-center" style="margin-top:20px;">
        <p>Copyright &copy;2018 &nbsp;<a href="http://www.zhangkaixuan.cn">KaiXuan</a></p>
    </div>
</footer>
</body>
</html>